package com.shigen.springcloud.service;

import com.shigen.springcloud.entity.CommonResult;
import com.shigen.springcloud.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {

  @PostMapping(value = "payment/create")
  CommonResult create(@RequestBody Payment payment);

  @GetMapping(value = "payment/getPayment/{id}")
  CommonResult getPaymentById(@PathVariable("id") Long id);

}
